/*
 * XMLReader.hpp
 *
 *  Created on: Dec 22, 2013
 *      Author: paste
 */

#ifndef XMLREADER_HPP_
#define XMLREADER_HPP_

namespace saxpp
{

  template<class CH, class TRAITS>
    class ContentHandler;

  template<class CH, class TRAITS>
    class DTDHandler;

  template<class CH, class TRAITS>
    class EntityResolver;

  template<class CH, class TRAITS>
    class ErrorHandler;

  template<class CH = char, class TRAITS = std::char_traits<CH> >
    class XMLReader
    {
    public:

      virtual
      ~XMLReader()
      {
      }

      virtual ContentHandler<CH, TRAITS> *
      getContentHandler() const = 0;

      virtual DTDHandler<CH, TRAITS> *
      getDTDHandler() const = 0;

      virtual EntityResolver<CH, TRAITS> *
      getEntityResolver() const = 0;

      virtual ErrorHandler<CH, TRAITS> *
      getErrorHandler() const = 0;

      virtual bool
      getFeature(const std::string &name) const = 0;

      virtual void *
      getProperty(const std::string &name) const = 0;

      virtual void
      parse(std::basic_istream<CH, TRAITS> &input) = 0;

      virtual void
      parse(const std::string &uri) = 0;

      virtual void
      setContentHandler(ContentHandler<CH, TRAITS> *handler) = 0;

      virtual void
      setDTDHandler(DTDHandler<CH, TRAITS> *handler) = 0;

      virtual void
      setEntityResolver(EntityResolver<CH, TRAITS> *handler) = 0;

      virtual void
      setErrorHandler(ErrorHandler<CH, TRAITS> *handler) = 0;

      virtual void
      setFeature(const std::string &name, const bool &value) = 0;

      virtual void
      setProperty(const std::string &name, void *value) = 0;
    };

}

#endif /* XMLREADER_HPP_ */
